package com.sams.util;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

import com.sams.controller.ProcessmanagerController;

public class PropertiesUtil {
	static Properties properties = new Properties();
	static {
		
		InputStream inputStream = ProcessmanagerController.class.getClassLoader()
				.getResourceAsStream("db.properties");
		//读配置文件中的 上传地址
		try {
			properties.load(inputStream);
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
	/**
	 * 根据key 获取 value
	 * @param key
	 * @return
	 */
	public static String getProperty(String key) {
		return properties.getProperty(key);
	}
}
